import 'package:example/app/data/local/local_login_model_repository.dart';
import 'package:example/app/routes/app_pages.dart';
import 'package:flutter_base_framework/flutter_base_framework.dart';
import 'package:flutter_base_framework/interfaces/i_http_config.dart';

class HttpConfig extends IHttpConfig{
  @override
  var errorCode = -1;

  @override
  var successCode = 0;

  @override
  var tokenInvalidCode = 401;

  @override
  void tokenInvalidHandler() {
    /// 跳转到登录页面
    Get.toNamed(Routes.LOGIN);
    LocalLoginModelRepository.deleteLoginModel();
  }

}